import React, { Component } from 'react';
import { Router, Route,Switch } from 'react-router-dom';
import {List,Detail} from './_components'
import { createBrowserHistory } from 'history';

const history = createBrowserHistory();

class App extends Component {
  render() {
    return (
      <Router history={history}>
              <Switch>
              <Route exact path="/" component={List} />
              <Route path="/rooms/:id" component={Detail} />
              </Switch>
      </Router>
    );
  }
}

export default App;
